]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
workspace: Handle minimized windows in layout
authorFlorian Müllner <fmuellner@gnome.org>
Thu, 25 Jun 2020 18:25:22 +0000 (20:25 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Mon, 6 Jul 2020 22:05:36 +0000 (00:05 +0200)
The new layout manager always uses the window's regular size and position
for the floating state, but the preview of minimized windows should be
hidden instead.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1345

js/ui/workspace.js

index dd7dacbeea0e2a3aae96c12b2a9e937fe08f2a75..b84c45b1f09df512f0b2ad5a4385f2fad00a2919 100644 (file)
@@ -585,10 +585,17 @@ var WorkspaceLayout = GObject.registerClass({
 
             child.slotId = index;
 
-            workspaceBox.x1 = child.boundingBox.x - this._workarea.x;
-            workspaceBox.x2 = workspaceBox.x1 + child.boundingBox.width;
-            workspaceBox.y1 = child.boundingBox.y - this._workarea.y;
-            workspaceBox.y2 = workspaceBox.y1 + child.boundingBox.height;
+            if (windowInfo.metaWindow.showing_on_its_workspace()) {
+                workspaceBox.x1 = child.boundingBox.x - this._workarea.x;
+                workspaceBox.x2 = workspaceBox.x1 + child.boundingBox.width;
+                workspaceBox.y1 = child.boundingBox.y - this._workarea.y;
+                workspaceBox.y2 = workspaceBox.y1 + child.boundingBox.height;
+            } else {
+                workspaceBox.set_origin(this._workarea.x, this._workarea.y);
+                workspaceBox.set_size(0, 0);
+
+                child.opacity = this._stateAdjustment.value * 255;
+            }
 
             workspaceBox.scale(allocationScale);